package cn.tutu.blockchain.sysuser.entity;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotBlank;

/**
 * 
 * <p>
 * Title: SysUser
 * </p>
 * <p>
 * Description:
 * </p>
 * 
 * @author 眭善峰
 * @date 2018年4月25日
 *
 */
public class SysUser implements Serializable {

	private static final long serialVersionUID = -1073638492493589965L;
	private String id; // id
	@NotBlank(message = "手机号不能为空")
	@Pattern(regexp = "^[0-9][0-9][0-9]\\d{4,12}$", message = "手机号格式错误")
	private String phone; // 手机号
	private String ethId; // ethid
	private String ethCurrency;
	private String nickName; // 昵称
	@NotBlank(message = "密码不可能为空")
	private String password; // 登录密码
	private String transactionPwd; // 交易密码
	private String referrerPhone; // 推荐人电话
	private Double integral; // 积分
	private Date createDateTime; // 创建时间
	private Date lastUpdateDateTime; // 最后更新时间
	private String disableTran;  //0:允许转账  1:不允许转账
	private SysRole role;

	// 前端字段
	@NotBlank(message = "验证码不可为空")
	private String verificationCode; // 验证码

	public SysUser() {

	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEthId() {
		return ethId;
	}

	public void setEthId(String ethId) {
		this.ethId = ethId;
	}

	public String getEthCurrency() {
		return ethCurrency;
	}

	public void setEthCurrency(String ethCurrency) {
		this.ethCurrency = ethCurrency;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Date getCreateDateTime() {
		return createDateTime;
	}

	public void setCreateDateTime(Date createDateTime) {
		this.createDateTime = createDateTime;
	}

	public Date getLastUpdateDateTime() {
		return lastUpdateDateTime;
	}

	public void setLastUpdateDateTime(Date lastUpdateDateTime) {
		this.lastUpdateDateTime = lastUpdateDateTime;
	}

	public SysRole getRole() {
		return role;
	}

	public void setRole(SysRole role) {
		this.role = role;
	}

	public String getVerificationCode() {
		return verificationCode;
	}

	public void setVerificationCode(String verificationCode) {
		this.verificationCode = verificationCode;
	}

	public String getReferrerPhone() {
		return referrerPhone;
	}

	public void setReferrerPhone(String referrerPhone) {
		this.referrerPhone = referrerPhone;
	}

	public Double getIntegral() {
		return integral;
	}

	public void setIntegral(Double integral) {
		this.integral = integral;
	}

	public String getTransactionPwd() {
		return transactionPwd;
	}

	public void setTransactionPwd(String transactionPwd) {
		this.transactionPwd = transactionPwd;
	}
	



	public String getDisableTran() {
		return disableTran;
	}

	public void setDisableTran(String disableTran) {
		this.disableTran = disableTran;
	}

	@Override
	public String toString() {
		return "SysUser [id=" + id + ", phone=" + phone + ", nickName=" + nickName + ", password=" + password + "]";
	}

}
